package ServiceLocatorPattern;

/**
 * @Author: zheng
 * @CreateTime: 2022-08-27  16:14
 * @Description:
 * @Version: 1.0
 */
public class ServiceLocatorPatternDemo {
    public static void main(String[] args) {
        Service service = ServiceLocator.getService("Service1");
        service.execute();
        service = ServiceLocator.getService("Service2");
        service.execute();
        service = ServiceLocator.getService("Service1");
        service.execute();
        service = ServiceLocator.getService("Service2");
        service.execute();
    }
}